import {request} from '@/utils/request.js'
import {appConfig} from '@/config/config.js'

// 查询我的收藏列表
export function getCollectList(params) {
	return request.get(appConfig.WEB_API + '/user/collect', params)
}

// 根据收藏ID删除我的收藏
export function delCollectByGoodsId(goodsId) {
	return request.delete(appConfig.WEB_API + '/user/collect/' + goodsId)
}

// 新增商品收藏
export function saveCollect(params) {
	return request.post(appConfig.WEB_API + '/user/collect', params)
}

// 判断商品是否收藏
export function isCollect(goodsId) {
	return request.get(appConfig.WEB_API + '/user/iscollect/' + goodsId)
}